package main.java.ssm.entity;/**
 * Created by CoolWen on 2017/5/19.
 */

/**
 * @author CoolWen
 * @version 2017-05-19 9:49
 */
public class SystemContext {
    private static ThreadLocal<Integer> pageOffset = new ThreadLocal<>();
    private static ThreadLocal<Integer> pageSize = new ThreadLocal<>();

    public static void setPageSize(Integer _pageSize) {
        pageSize.set(_pageSize);
    }

    public static int getPageSize() {
        return pageSize.get();
    }

    public static void removePagSize() {
        pageSize.remove();
    }

    public static void setPageOffset(Integer _pageOffset) {
        pageOffset.set(_pageOffset);
    }

    public static int getPageOffset() {
        return pageOffset.get();
    }

    public static void removePageOffset() {
        pageOffset.remove();
    }
}
